It depends how it fails. Most of the time, a failed flash is due to either a faulty drive or adapter. Retry. Then try with another adaptor, drive or card and usb port.
If you're flashing from an url and it fails, try downloading the file first and flash it again from file.
Sometimes, things might go wrong, and you end up with a half-flashed drive that is unusable by your operating systems, and common graphical tools might even refuse to get it back to a normal state. To solve these kinds of problems, we've collected a list of fail-proof methods to completely erase your drive in major operating systems.